package org.erp.store.strategy.impl;

import lombok.extern.slf4j.Slf4j;
import org.erp.common.enums.DeviceInventoryEvent;
import org.erp.store.domain.dto.BatchDeviceInventoryDto;
import org.erp.store.domain.dto.BatchDeviceInventoryResponseDto;
import org.erp.store.domain.dto.BatchStatusMqMessageDto;
import org.erp.store.domain.entity.DeviceInventory;
import org.erp.store.infrastructure.event.InventoryLogEvent;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.stream.Collectors;

/**
 * 驳回到入库（确认返库）策略
 */
@Slf4j
@Component
public class RejectToInboundInventoryEventStrategy extends BaseInventoryEventStrategy {
    @Override
    public DeviceInventoryEvent getEvent() { return DeviceInventoryEvent.REJECT_TO_INBOUND; }

    @Override
    public BatchDeviceInventoryResponseDto execute(BatchDeviceInventoryDto dto) {
        return batchUpdate(dto, (inv, invDto) -> {}, mqAndLogAfterPersistHook);
    }
}
